<template>
	<view class="">
		<view class="d-flex  border-bottom  py-1 my-3" v-for="action in actions" :key="action.id" @click="jumpOrder(action.id)">
			<view class="userAvatar pr-2">
				<image :src="action.cover" 
				:style="{width:width,height:height,borderRadius: borderRadius}"></image>
			</view>
			<view class="userDesc d-flex flex-column j-around w-100">
				<text class="text-dark font-md font-weight">{{ action.name }}</text>
				<view class="text-dark font-sm mt-1">
					{{ action.excerpt }}
				</view>
		
				<view class="yy font-sm px-2 py-1 text-center" v-if="showBtn" @click="jumpOrder(action.id)">
					查看详情
				</view>
			</view>
		</view>
	</view>
	
</template>

<script>
	export default {
		props: {
			actions:{
				type:Object
			},
			width:{
				type:String,
				default:'200rpx'
			},
			height:{
				type:String,
				default:'140rpx'
			},
			borderRadius:{
				type:String,
				default:'20rpx'
			},
			showBtn:{
				type:Boolean,
				default:true
			}
		},
		methods:{
			jumpOrder(id){
				uni.navigateTo({
					url: '/pages/actionDetail/actionDetail?id='+id,
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
				
			}
		}
	}
</script>

<style>

	.yy{
		margin-left: 66%;
		border: 1px solid #FF5D60;
		border-radius: 60rpx;
		color:#FF5D60
	}
</style>
